package com.yuyou.train.lesson.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;

import com.yuyou.train.service.api.lesson.dto.QuestionPageDTO;
import com.yuyou.train.service.api.lesson.entity.ResourceQuestion;
import com.yuyou.train.util.bean.Pagination;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface ResourceQuestionMapper {
    int deleteByPrimaryKey(String id);

    int insert(ResourceQuestion record);

    ResourceQuestion selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(ResourceQuestion record);
    
    List<QuestionPageDTO> findQuestionPageList(Pagination<QuestionPageDTO> p);
    
    int findQuestionPageCount(Pagination<QuestionPageDTO> p);
    
    String selectMaxNumberLock(String exNumber);

    int batchUpdateStatus(@Param(value="ids")List<String> ids , @Param(value="isUse")String isUse);

    int countQuestionByIdsAndStatus(@Param(value="ids")List<String> ids , @Param(value="isUse")String isUse);
}